<template>
  <div class="contact-page">
    <PageHeader
      title="联系我们"
      subtitle="随时与我们取得联系，我们期待您的反馈"
      :breadcrumbItems="[{ text: '首页', path: '/' }]"
      currentText="联系我们"
    />
    
    <!-- 背景横幅 -->
    <div class="contact-banner" :style="{ backgroundImage: `url(${require('@/assets/images/contact/咨询栏1.jpg')})` }">
      <div class="overlay"></div>
      <div class="banner-content">
        <h2>让沟通更简单</h2>
        <p>无论您有任何问题、建议或合作意向，我们都随时准备倾听</p>
      </div>
    </div>
    
    <div class="page-container">
      <div class="contact-content">
        <!-- 联系信息 -->
        <div class="contact-info">
          <h2 class="section-title">联系方式</h2>
          <div class="info-list">
            <div class="info-item">
              <i class="el-icon-location"></i>
              <div class="info-text">
                <h3>公司地址</h3>
                <p>甘肃省兰州市皋兰县海河街6号</p>
              </div>
            </div>
            <div class="info-item">
              <i class="el-icon-phone"></i>
              <div class="info-text">
                <h3>联系电话</h3>
                <p>087-32544554-322</p>
              </div>
            </div>
            <div class="info-item">
              <i class="el-icon-message"></i>
              <div class="info-text">
                <h3>电子邮箱</h3>
                <p>contact@yifantech.com</p>
              </div>
            </div>
            <div class="info-item">
              <i class="el-icon-time"></i>
              <div class="info-text">
                <h3>工作时间</h3>
                <p>周一至周五: 9:00-18:00</p>
              </div>
            </div>
          </div>
          
          <!-- 社交媒体链接 -->
          <div class="social-links">
            <h3>关注我们</h3>
            <div class="social-icons">
              <a href="#" class="social-icon"><i class="el-icon-s-custom"></i></a>
              <a href="#" class="social-icon"><i class="el-icon-s-promotion"></i></a>
              <a href="#" class="social-icon"><i class="el-icon-s-check"></i></a>
              <a href="#" class="social-icon"><i class="el-icon-s-goods"></i></a>
            </div>
          </div>
          
          <!-- 公司照片展示 -->
          <div class="company-photos">
            <h3>公司环境</h3>
            <div class="photo-grid">
              <div class="photo-item">
                <img :src="require('@/assets/images/about/办公环境2.jpg')" alt="公司环境">
              </div>
              <div class="photo-item">
                <img :src="require('@/assets/images/about/办公环境3.jpg')" alt="公司环境">
              </div>
              <div class="photo-item">
                <img :src="require('@/assets/images/about/办公环境4.jpg')" alt="公司环境">
              </div>
              <div class="photo-item">
                <img :src="require('@/assets/images/about/办公环境5.jpg')" alt="公司环境">
              </div>
            </div>
          </div>
        </div>
        
        <!-- 联系表单 -->
        <div class="contact-form-container">
          <h2 class="section-title">在线留言</h2>
          <p class="form-desc">如果您有任何问题或建议，请填写以下表单，我们会尽快回复您</p>
          <ContactForm />
        </div>
      </div>
      
      <!-- 常见问题 -->
      <div class="faq-section">
        <h2 class="section-title text-center">常见问题</h2>
        <p class="section-desc text-center">以下是客户常见的一些问题，希望能够帮助到您</p>
        
        <el-collapse>
          <el-collapse-item title="如何联系你们的客服团队？" name="1">
            <div>您可以通过以上提供的电话、邮箱与我们联系，也可以通过在线留言表单提交您的问题，我们的客服团队会在24小时内回复您。</div>
          </el-collapse-item>
          <el-collapse-item title="你们提供上门服务吗？" name="2">
            <div>是的，对于企业客户，我们提供上门技术支持和咨询服务，具体可与我们的客户经理联系安排。</div>
          </el-collapse-item>
          <el-collapse-item title="如何申请产品演示？" name="3">
            <div>您可以通过在线留言表单申请产品演示，或直接致电我们的销售部门。我们会安排专业的产品经理为您提供详细的产品演示。</div>
          </el-collapse-item>
          <el-collapse-item title="你们的售后服务政策是什么？" name="4">
            <div>我们为所有产品提供至少1年的免费技术支持和维护服务，部分产品可延长至3年。同时，我们提供7×24小时的紧急技术支持服务。</div>
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import PageHeader from '@/components/PageHeader.vue';
import ContactForm from '@/components/ContactForm.vue';
</script>

<style lang="scss" scoped>
.contact-page {
  padding-bottom: 60px;
  
  .contact-banner {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
    
    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
    }
    
    .banner-content {
      position: relative;
      z-index: 2;
      text-align: center;
      color: #fff;
      
      h2 {
        font-size: 36px;
        font-weight: 700;
        margin-bottom: 15px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      }
      
      p {
        font-size: 18px;
        max-width: 600px;
        margin: 0 auto;
        opacity: 0.9;
      }
    }
  }
  
  .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    
    @media (max-width: 992px) {
      grid-template-columns: 1fr;
    }
    
    .contact-info {
      .section-title {
        margin-bottom: 30px;
      }
      
      .info-list {
        margin-bottom: 40px;
        
        .info-item {
          display: flex;
          align-items: flex-start;
          margin-bottom: 25px;
          
          i {
            font-size: 24px;
            color: #409EFF;
            margin-right: 15px;
            margin-top: 5px;
          }
          
          .info-text {
            h3 {
              font-size: 16px;
              font-weight: 600;
              color: #333;
              margin-bottom: 5px;
            }
            
            p {
              font-size: 15px;
              color: #666;
              margin: 0;
            }
          }
        }
      }
      
      .social-links {
        margin-bottom: 40px;
        
        h3 {
          font-size: 18px;
          font-weight: 600;
          margin-bottom: 20px;
          color: #333;
        }
        
        .social-icons {
          display: flex;
          gap: 15px;
          
          .social-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background-color: #f5f7fa;
            color: #409EFF;
            text-decoration: none;
            transition: all 0.3s ease;
            
            i {
              font-size: 20px;
            }
            
            &:hover {
              background-color: #409EFF;
              color: #fff;
              transform: translateY(-3px);
            }
          }
        }
      }
      
      .company-photos {
        h3 {
          font-size: 18px;
          font-weight: 600;
          margin-bottom: 20px;
          color: #333;
        }
        
        .photo-grid {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 15px;
          
          .photo-item {
            border-radius: 8px;
            overflow: hidden;
            height: 140px;
            
            img {
              width: 100%;
              height: 100%;
              object-fit: cover;
              transition: transform 0.3s ease;
              
              &:hover {
                transform: scale(1.05);
              }
            }
          }
        }
      }
    }
    
    .contact-form-container {
      .section-title {
        margin-bottom: 15px;
      }
      
      .form-desc {
        font-size: 15px;
        color: #666;
        margin-bottom: 30px;
      }
    }
  }
  
  .faq-section {
    .section-title {
      margin-bottom: 15px;
      
      &.text-center {
        text-align: center;
      }
    }
    
    .section-desc {
      font-size: 15px;
      color: #666;
      margin-bottom: 30px;
      max-width: 700px;
      margin-left: auto;
      margin-right: auto;
      
      &.text-center {
        text-align: center;
      }
    }
  }
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #409EFF;
  }
  
  &.text-center {
    &::after {
      left: 50%;
      transform: translateX(-50%);
    }
  }
}

.page-container {
  max-width: 1200px;
  padding: 0 15px;
  margin: 0 auto;
}
</style>